<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/7/22 0022
 * Time: 下午 20:56
 */

namespace app\admin\model;

use think\Model;

class Menulist extends Model
{
    public function getAllMenu($where){
        $rs = Menulist::where($where)

            ->select();
        return $rs;
    }

    public function getInMenu($where){

        $rs = Menulist::where($where)
            ->where($where)
            ->select();
        return $rs;
    }

    public function getOneMenu($where){
        $rs = Menulist::where($where)
        ->find();
        return $rs;
    }

    public function addMenu($data){
        $rs = Menulist::data($data)
            ->save();
        return $rs;
    }

    public function delMenu($where){
        $rs = Menulist::where($where)
            ->delete();
        return $rs;
    }
}